$(function() {
	WASP_WIDGET.triggerIRadio();
	var graphChart = echarts.init(document.getElementById('graphChart')); 
	graphChart.clear();  
	graphChart.showLoading({text: '正在努力的读取数据中...'}); 
	option = {
		    tooltip: {},
		    animationDurationUpdate: 1500,
		    series : [
		        {
		            type: 'graph',
		            layout: 'none',
		            symbolSize: 50,
		            roam: true,
		            label: {
		                normal: {
		                    show: true
		                }
		            },
		            edgeSymbol: ['circle', 'arrow'],
		            edgeSymbolSize: [4, 10],
		            edgeLabel: {
		                normal: {
		                    textStyle: {
		                        fontSize: 20
		                    }
		                }
		            },
		            data: [],
		            links: [{
		                source: 0,
		                target: 1,
		                symbolSize: [5, 20],
		                lineStyle: {
		                    normal: {
		                        width: 5,
		                        curveness: 0.0
		                    }
		                }
		            },{
		                source: 1,
		                target: 2,
		                symbolSize: [5, 20],
		                lineStyle: {
		                    normal: {
		                        width: 5,
		                        curveness: 0.0
		                    }
		                }
		            },{
		                source: 2,
		                target: 3,
		                symbolSize: [5, 20],
		                lineStyle: {
		                    normal: {
		                        width: 5,
		                        curveness: 0.0
		                    }
		                }
		            },{
		                source: 3,
		                target: 4,
		                symbolSize: [5, 20],
		                lineStyle: {
		                    normal: {
		                        width: 5,
		                        curveness: 0.0
		                    }
		                }
		            },{
		                source: 4,
		                target: 5,
		                symbolSize: [5, 20],
		                lineStyle: {
		                    normal: {
		                        width: 5,
		                        curveness: 0.0
		                    }
		                }
		            },{
		                source: 5,
		                target: 6,
		                symbolSize: [5, 20],
		                lineStyle: {
		                    normal: {
		                        width: 5,
		                        curveness: 0.0
		                    }
		                }
		            },{
		                source: 6,
		                target: 7,
		                symbolSize: [5, 20],
		                lineStyle: {
		                    normal: {
		                        width: 5,
		                        curveness: 0.0
		                    }
		                }
		            },{
		                source: 7,
		                target: 8,
		                symbolSize: [5, 20],
		                lineStyle: {
		                    normal: {
		                        width: 5,
		                        curveness: 0.0
		                    }
		                }
		            }],
		            lineStyle: {
		                normal: {
		                    opacity: 0.9,
		                    width: 2,
		                    curveness: 0
		                }
		            }
		        }
		    ]
		};
	var prdTypeVal = $("[type='radio']:checked").val();
	if(prdTypeVal > 0){
		for (var i = 0; i < prdTypeVal; i++) {
			var prdStatusNM = "";
			if(i == 0){
				prdStatusNM = "创设中";
			}else if(i == 1){
				prdStatusNM = "备案中";
			}else if(i == 2){
				prdStatusNM = "已备案";
			}else if(i == 3){
				prdStatusNM = "发行中";
			}else if(i == 4){
				prdStatusNM = "存续中";
			}else if(i == 5){
				prdStatusNM = "到期";
			}else if(i == 6){
				prdStatusNM = "清盘中";
			}else if(i == 7){
				prdStatusNM = "已清盘";
			}
			option.series[0].data[i] = {name: prdStatusNM,x: 100,y: 100*(i+1)};
		}
	}else{
		toastr.warning('参数错误！');
	}
	//载入图表  
	loadDrugs(graphChart,option);
});

//查询  
function loadDrugs(element,option) {  
	element.setOption(option, true);  
	element.hideLoading();
} 